﻿
@{ 
    Layout = null;
}
<html>
<head>
   <title>Index</title>
 <style type="text/css">
  *{margin:2px 0 2px 0;padding:2px 0 2px 0;}
 </style>
 <link href="../../Scripts/PageCreater/Css/Style.css" rel="stylesheet" type="text/css" />
<script src='@Url.Content("../../Scripts/jquery-1.5.1.min.js")' type="text/javascript"></script>
    <script src="../../Scripts/PageCreater/Scripts/PageCreater.js" type="text/javascript"></script>
    <script src='@Url.Content("../../Scripts/auto/jquery.autocomplete.js")' type="text/javascript"></script>
    <script src='@Url.Content("../../Scripts/auto/jquery.bgiframe.min.js")' type="text/javascript"></script>
    <script src='@Url.Content("../../Scripts/auto/thickbox-compressed.js")' type="text/javascript"></script>
    <link href='@Url.Content("../../Scripts/auto/jquery.autocomplete.css")' rel="stylesheet" type="text/css"/>
<script type="text/javascript">
    var strColumn = "ID,编号,false,text,notnull,"
                        + "Uname,学生姓名,false,text,notnull,"
                        + "Cname,账号,false,text,notnull,"
                        + "Iterm,姓名,false,text,notnull,"
                        + "InitialScore,最终成绩,false,text,notnull,"
                        + "Opreate, ,false,null,null";
    var strOpreate = " ,/User/Logout,false";
    $(document).ready(function () {
        CreateIndexPage("/Score/GetPaged", strColumn, strOpreate);
      

        $("#seach1").focus(function () {
            var text = $(this).val();
            if (text == "请输入班级名称") {
                $(this).val("");
                $(this).css("color", "#000");
            }

        }).blur(function () {
            var text = $(this).val();
            if (text == "") {
                $(this).val("请输入班级名称");
                $(this).css("color", "#ddd");
            }
        })

        $("#seach1").autocomplete("/Score/FindClass", {
            width: 200,
            selectFirst: true,
            formatItem: function (data, i, total) {
                var arr = String(data).split(",");
                return "<I>" + arr[0] + "</I>";

            },
            formatMatch: function (data, i, total) {
                return data[0];
            },
            formatResult: function (data) {

                var arr = String(data).split(",");
                return arr[0];
            }
        }).result(function (event, data, formatted) {
            var arr = String(data).split(",");
            if (arr[1] == null) {
                alert(arr[1]);
            }
            else {
                CreateIndexPage("/Score/GetPageds?oId=" + arr[1] + "", strColumn, strOpreate);
            }
        });
    })
  
</script>
</head>

    <body> 
    @{
        var c = TempData["name"] as string;
     }
      
      <div class="Content">
        <div id="Top">
         <input  type="text" value="@c" style=" height:20px; color:#ddd;" id="seach1"/>
        </div>
        <div id="tabInfo">
        </div>
        <div id="pageIndex" class="pageIndex" style="margin-top: 5px; float:left; width: 95%">
        </div>
        <div style="float:left" id="hang">
        
        </div>
    </div>
  </body>
</html>

